package com.xz.stu.server.vo.term;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Data
public class TermBaseVO {

    @Schema(description = "学期名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024春季学期")
    @NotBlank(message = "学期名称不能为空")
    @Size(max = 50, message = "学期名称长度不能超过50个字符")
    private String termName;

    @Schema(description = "学期编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-1")
    @NotBlank(message = "学期编码不能为空")
    @Size(max = 20, message = "学期编码长度不能超过20个字符")
    private String termCode;

    @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开始日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private String startDate;

    @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "结束日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private String endDate;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "状态不能为空")
    private Integer status; // 0-正常 1-停用
}
